﻿////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// <copyright>Copyright 2008-2011 Andreas Huber Doenni</copyright>
// Distributed under the GNU General Public License version 2 (GPLv2).
// See accompanying file License.txt or copy at http://phuse.codeplex.com/license.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

namespace Phuse.Net.Forums
{
    using System;
    using System.Security.Cryptography;

    /// <summary>Provides a mechanism to encrypt and decrypt byte sequences.</summary>
    /// <threadsafety static="true" instance="false"/>
    public interface ICryptoProvider
    {
        /// <summary>Encrypts <paramref name="input"/> and returns the result.</summary>
        byte[] Encrypt(byte[] input);

        /// <summary>Decrypts <paramref name="input"/> and returns the result.</summary>
        /// <exception cref="CryptographicException">The decryption failed, see <see cref="Exception.Message"/> for more
        /// information.</exception>
        byte[] Decrypt(byte[] input);
    }
}
